package com.zxh.zhenxihuan.controller;

import com.zxh.zhenxihuan.service.ShangjiaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@CrossOrigin
public class ShangJiaController {
    @Autowired
    ShangjiaService shangjiaService;
    @PostMapping("/getShangjiaPage")
    Map<String,Object> getShangjiaPage(@RequestBody Map map){
        Integer pageNum=(Integer)map.get("pageNum");
        Integer pageCount=(Integer)map.get("pageCount");
        return shangjiaService.getShangjiaPage(pageNum,pageCount);
    }
}
